console.log("ok");

//安装vue
//npm i vue -S
//引入vue
import  Vue from "vue";
//安装路由
import VueRouter from   "vue-router";
//手动调用
Vue.use(VueRouter);

//引入组件
//主组件
import index from "./components/index.vue";


//全部引入，避免按需引入的繁琐性
import Mint from 'mint-ui';
//引入样式
//样式文件需要单独引入
import "mint-ui/lib/style.css";
//手动调用
Vue.use(Mint);

//导入mui的样式
//导入从GitHub上down下来的zip里面dist里面的已发布的css/js/fonts文件
import "./mui/css/mui.min.css"

//导入购物车图标所需要的mui的css及ttf字体文件
import "./mui/css/icons-extra.css"
import "./mui/fonts/mui-icons-extra.ttf"

//引入tabbar对应的四个基本组件
import HomeContainer from "./components/tabbar/HomeContainer.vue";
import MemberContainer from "./components/tabbar/HomeContainer.vue";
import ShopcarContainer from "./components/tabbar/ShopcarContainer.vue";
import SearchContainer from "./components/tabbar/SearchContainer.vue";

//设置对应的路由规则routes里面





//定义路由
var router = new VueRouter({
    routes:[
        {
            path:"/home",component:HomeContainer
        },
        {
            path:"/member",component:MemberContainer
        },
        {
            path:"/shopcar",component:ShopcarContainer
        },
        {
            path:"/search",component:SearchContainer
        }

    ],
    linkActiveClass:"mui-active"     //覆盖默认的路由高亮的类，默认的类叫router-link-active
});


var vm = new Vue({
    el:"#demo",
    router,    //将路由挂载在vm实例上
    render: c=>c(index)        //通过render渲染页面
});

